<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          
 <html xmlns="http://www.w3.org/1999/xhtml" 
 	   xmlns:ui="http://java.sun.com/jsf/facelets"
 	   xmlns:f="http://java.sun.com/jsf/core" 
	   xmlns:h="http://java.sun.com/jsf/html"
	   xmlns:t="http://myfaces.apache.org/tomahawk">
 	<body>
 	<!-- common menu for all pages -->
 	
		<ui:composition>
				<t:panelGrid columns="2">
					<t:outputText value="Id"/>
					<t:outputText value="#{manageProductsBean.singleProduct.id}"/> 
					<t:outputText value="Creator"/>
					<t:outputText value="#{manageProductsBean.singleProduct.creator.name}"/>
					<t:outputText value="Modifier"/>
					<t:outputText value="#{manageProductsBean.singleProduct.modifier.name}"/>
					<t:outputText value="Product Name"/>
					<t:panelGroup>
						<t:inputText id="name" labek="name" value="#{manageProductsBean.singleProduct.name}" >
							<f:validateLength minimum="2" maximum="25" />
						</t:inputText>
						<t:message for="name" errorStyle="color:red; text-decoration:overline" />	
					</t:panelGroup>
					<t:outputText value="Version"/>
					<t:panelGroup>
						<t:inputText id="version" label="version" value="#{manageProductsBean.singleProduct.version}">
							<f:validateLength minimum="1" maximum="25" />
						</t:inputText>
						<t:message for="version" errorStyle="color:red; text-decoration:overline" />
					</t:panelGroup>
					<t:outputText value="Description"/>
					<t:panelGroup>
						<t:inputTextarea id="description" label="description" value="#{manageProductsBean.singleProduct.description}">
							<f:validateLength minimum="0" maximum="500" />
						</t:inputTextarea>
						<t:message for="description" errorStyle="color:red; text-decoration:overline" />
					</t:panelGroup>
			  	 	<t:commandButton action="#{manageProductsBean.editProduct}" value="save" />
			   		<t:commandButton action="productsList" value="cancel" />	 	
	   		</t:panelGrid>	
	   </ui:composition>
   </body>
 </html>